package com.tanjie.blackbean.system.admin.model.rel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 用户和角色关联表
 *
 * @author tanjie
 * @since 2022-04-21
 */
@Getter
@Setter
@ToString
@TableName("sys_user_role")
@Schema(name = "UserRolePO", description = "用户和角色关联表")
public class UserRolePO implements Serializable {

    private static final long serialVersionUID = 1L;


    public UserRolePO() {
    }

    public UserRolePO(String userId, String roleId) {
        this.userId = userId;
        this.roleId = roleId;
    }

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private String userId;

    @Schema(description = "角色ID")
    @TableField("role_id")
    private String roleId;

}
